<?php
$tm=$_GET['tm'];
$phb='a'.$tm;
include("database.php");
$sql = "SELECT * FROM $phb ORDER BY `df` DESC";
$res=$conn->query($sql);
$data=$res->fetch_all();
$conn->close();
echo json_encode($data);
?>